package tt.dz.egobus.servicemanager.facade.user;

import com.alibaba.dubbo.config.annotation.Reference;
import tt.dz.egobus.api.ResponseBack;
import tt.dz.egobus.api.page.Page;
import tt.dz.egobus.api.page.Pageable;
import tt.dz.egobus.api.usercenter.DeleteBack;
import tt.dz.egobus.api.usercenter.staff.StaffApiService;
import tt.dz.egobus.api.usercenter.staff.StaffBack;
import tt.dz.egobus.servicemanager.facade.interator.Facade;

import java.util.List;

/**
 * @author Anson
 * @date 17-4-1
 * @name 司机管理的facade
 * @since 1.0.3
 */
@Facade(facadeName = "staff")
public class StaffFacade {

    @Reference(version = "1.0.3", timeout = 10000)
    private StaffApiService staffApiService;

    public ResponseBack<List<StaffBack>> queryAllStaff() {
        return staffApiService.queryAllStaff();
    }

    public ResponseBack<Boolean> judgeStaffExists(String idcard) {
        return staffApiService.judgeStaffExists(idcard);
    }

    public ResponseBack<StaffBack> createStaff(String realName, String idCard) {
        return staffApiService.createStaff(realName, idCard);
    }

    public ResponseBack<Page<StaffBack>> queryStaffPage(Pageable pageable) {
        return staffApiService.queryStaffPage(pageable);
    }

    public ResponseBack<DeleteBack> deleteStaff(String[] ids) {
        return staffApiService.deleteStaff(ids);
    }

    public ResponseBack<StaffBack> updataStaff(String sId, String realName, String idCard) {
        return staffApiService.updataStaff(sId,realName,idCard);
    }
}
